package com.example.spring_mybatis.mapper;

import com.example.spring_mybatis.model.UserInfo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 九转苍翎
 * Date: 2025/7/23
 * Time: 16:38
 */
@Mapper
public interface UserInfoXMLMapper {
    Integer insertDemo1(UserInfo userInfo);

    Integer deleteDemo1(Integer id);

    Integer updateDemo1(UserInfo userInfo);

    List<UserInfo> selectDemo1();

    List<UserInfo> selectDemo2();
    //动态sql if和trim标签
    Integer insertDemoByCondition(UserInfo userInfo);
    // where标签 自动生成'where'关键字和去除前面的'and'
    List<UserInfo> selectDemoByCondition(UserInfo userInfo);
    //set标签 自动生成'set'关键字和去除后面的逗号
    Integer updateDemoByCondition(UserInfo userInfo);
    //foreach标签
    Integer deleteDemoByList(List<Integer> ids);
}
